home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s1.arc / GETPARAM.MOD < prev    next >
Text File  |  1987-09-19  |  28KB  |  793 lines

  1.  
  2. (*----------------------------------------------------------------------*)
  3. (*         Get_Parameter --- Get value of PibTerm parameter             *)
  4. (*----------------------------------------------------------------------*)
  5.  
  6. PROCEDURE Get_Parameter(     Param_Num  : INTEGER;
  7.                          VAR Param_Str  : AnyStr   );
  8.  
  9. (*----------------------------------------------------------------------*)
  10. (*                                                                      *)
  11. (*     Procedure:  Get Parameter                                        *)
  12. (*                                                                      *)
  13. (*     Purpose:    Get value of PibTerm parameter                       *)
  14. (*                                                                      *)
  15. (*     Calling Sequence:                                                *)
  16. (*                                                                      *)
  17. (*        Get_Parameter(     Param_Num  : INTEGER;                      *)
  18. (*                       VAR Param_Str  : AnyStr   );                   *)
  19. (*                                                                      *)
  20. (*           Param_Num  --- Parameter to get                            *)
  21. (*           Param_Str  --- string parameter value                      *)
  22. (*                                                                      *)
  23. (*----------------------------------------------------------------------*)
  24.  
  25. VAR
  26.    I : INTEGER;
  27.  
  28. LABEL EndCase;
  29.  
  30. LABEL
  31.    L0,   L1,   L2,   L3,   L4,   L5,   L6,   L7,   L8,   L9,
  32.    L10,  L11,  L12,  L13,  L14,  L15,  L16,  L17,  L18,  L19,
  33.    L20,  L21,  L22,  L23,  L24,  L25,  L26,  L27,  L28,  L29,
  34.    L30,  L31,  L32,  L33,  L34,  L35,  L36,  L37,  L38,  L39,
  35.    L40,  L41,  L42,  L43,  L44,  L45,  L46,  L47,  L48,  L49,
  36.    L50,  L51,  L52,  L53,  L54,  L55,  L56,  L57,  L58,  L59,
  37.    L60,  L61,  L62,  L63,  L64,  L65,  L66,  L67,  L68,  L69,
  38.    L70,  L71,  L72,  L73,  L74,  L75,  L76,  L77,  L78,  L79,
  39.    L80,  L81,  L82,  L83,  L84,  L85,  L86,  L87,  L88,  L89,
  40.    L90,  L91,  L92,  L93,  L94,  L95,  L96,  L97,  L98,  L99,
  41.    L100, L101, L102, L103, L104, L105, L106, L107, L108, L109,
  42.    L110, L111, L112, L113, L114, L115, L116, L117, L118, L119,
  43.    L120, L121, L122, L123, L124, L125, L126, L127, L128, L129,
  44.    L130, L131, L132, L133, L134, L135, L136, L137, L138, L139,
  45.    L140, L141, L142, L143, L144, L145, L146, L147, L148, L149,
  46.    L150, L151, L152, L153, L154, L155, L156, L157, L158, L159,
  47.    L160, L161, L162, L163, L164, L165, L166, L167, L168, L169,
  48.    L170, L171, L172, L173, L174;
  49.  
  50. (*----------------------------------------------------------------------*)
  51.  
  52. FUNCTION IToS( I: INTEGER ) : ShortStr;
  53.  
  54. VAR
  55.    S: ShortStr;
  56.  
  57. BEGIN (* IToS *)
  58.  
  59.    STR( I , S );
  60.    IToS := S;
  61.  
  62. END   (* IToS *);
  63.  
  64. (*----------------------------------------------------------------------*)
  65.  
  66. FUNCTION RToS( R: REAL ) : ShortStr;
  67.  
  68. VAR
  69.    S: ShortStr;
  70.  
  71. BEGIN (* RToS *)
  72.  
  73.    STR( R:10:0 , S );
  74.    RToS := LTRIM( S );
  75.  
  76. END   (* RToS *);
  77.  
  78. (*----------------------------------------------------------------------*)
  79.  
  80. FUNCTION BToS( B: BOOLEAN ) : ShortStr;
  81.  
  82. VAR
  83.    S: ShortStr;
  84.  
  85. BEGIN (* BToS *)
  86.  
  87.    BToS := CHR( ORD( B ) + ORD( '0' ) );
  88.  
  89. END   (* BToS *);
  90.  
  91. (*----------------------------------------------------------------------*)
  92.  
  93. BEGIN (* Get_Parameter *)
  94.                                    (* Use jump table to avoid time-consuming *)
  95.                                    (* CASE statement.                        *)
  96.    INLINE(
  97.      $8B/$9E/>PARAM_NUM     {  MOV     BX,[BP+>Param_Num] ;Pick up parameter # to set}
  98.      /$89/$D8               {  MOV     AX,BX              ;#}
  99.      /$D1/$E3               {  SHL     BX,1               ;# * 2}
  100.      /$01/$C3               {  ADD     BX,AX              ;# * 3}
  101.      /$B8/>*+6              {  MOV     AX,>*+6            ;Address of first GOTO}
  102.      /$01/$C3               {  ADD     BX,AX              ;Add offset of paramater}
  103.      /$FF/$E3               {  JMP     BX                 ;Branch to proper GOTO}
  104.    );
  105.        GOTO L0;
  106.        GOTO L1;
  107.        GOTO L2;
  108.        GOTO L3;
  109.        GOTO L4;
  110.        GOTO L5;
  111.        GOTO L6;
  112.        GOTO L7;
  113.        GOTO L8;
  114.        GOTO L9;
  115.        GOTO L10;
  116.        GOTO L11;
  117.        GOTO L12;
  118.        GOTO L13;
  119.        GOTO L14;
  120.        GOTO L15;
  121.        GOTO L16;
  122.        GOTO L17;
  123.        GOTO L18;
  124.        GOTO L19;
  125.        GOTO L20;
  126.        GOTO L21;
  127.        GOTO L22;
  128.        GOTO L23;
  129.        GOTO L24;
  130.        GOTO L25;
  131.        GOTO L26;
  132.        GOTO L27;
  133.        GOTO L28;
  134.        GOTO L29;
  135.        GOTO L30;
  136.        GOTO L31;
  137.        GOTO L32;
  138.        GOTO L33;
  139.        GOTO L34;
  140.        GOTO L35;
  141.        GOTO L36;
  142.        GOTO L37;
  143.        GOTO L38;
  144.        GOTO L39;
  145.        GOTO L40;
  146.        GOTO L41;
  147.        GOTO L42;
  148.        GOTO L43;
  149.        GOTO L44;
  150.        GOTO L45;
  151.        GOTO L46;
  152.        GOTO L47;
  153.        GOTO L48;
  154.        GOTO L49;
  155.        GOTO L50;
  156.        GOTO L51;
  157.        GOTO L52;
  158.        GOTO L53;
  159.        GOTO L54;
  160.        GOTO L55;
  161.        GOTO L56;
  162.        GOTO L57;
  163.        GOTO L58;
  164.        GOTO L59;
  165.        GOTO L60;
  166.        GOTO L61;
  167.        GOTO L62;
  168.        GOTO L63;
  169.        GOTO L64;
  170.        GOTO L65;
  171.        GOTO L66;
  172.        GOTO L67;
  173.        GOTO L68;
  174.        GOTO L69;
  175.        GOTO L70;
  176.        GOTO L71;
  177.        GOTO L72;
  178.        GOTO L73;
  179.        GOTO L74;
  180.        GOTO L75;
  181.        GOTO L76;
  182.        GOTO L77;
  183.        GOTO L78;
  184.        GOTO L79;
  185.        GOTO L80;
  186.        GOTO L81;
  187.        GOTO L82;
  188.        GOTO L83;
  189.        GOTO L84;
  190.        GOTO L85;
  191.        GOTO L86;
  192.        GOTO L87;
  193.        GOTO L88;
  194.        GOTO L89;
  195.        GOTO L90;
  196.        GOTO L91;
  197.        GOTO L92;
  198.        GOTO L93;
  199.        GOTO L94;
  200.        GOTO L95;
  201.        GOTO L96;
  202.        GOTO L97;
  203.        GOTO L98;
  204.        GOTO L99;
  205.        GOTO L100;
  206.        GOTO L101;
  207.        GOTO L102;
  208.        GOTO L103;
  209.        GOTO L104;
  210.        GOTO L105;
  211.        GOTO L106;
  212.        GOTO L107;
  213.        GOTO L108;
  214.        GOTO L109;
  215.        GOTO L110;
  216.        GOTO L111;
  217.        GOTO L112;
  218.        GOTO L113;
  219.        GOTO L114;
  220.        GOTO L115;
  221.        GOTO L116;
  222.        GOTO L117;
  223.        GOTO L118;
  224.        GOTO L119;
  225.        GOTO L120;
  226.        GOTO L121;
  227.        GOTO L122;
  228.        GOTO L123;
  229.        GOTO L124;
  230.        GOTO L125;
  231.        GOTO L126;
  232.        GOTO L127;
  233.        GOTO L128;
  234.        GOTO L129;
  235.        GOTO L130;
  236.        GOTO L131;
  237.        GOTO L132;
  238.        GOTO L133;
  239.        GOTO L134;
  240.        GOTO L135;
  241.        GOTO L136;
  242.        GOTO L137;
  243.        GOTO L138;
  244.        GOTO L139;
  245.        GOTO L140;
  246.        GOTO L141;
  247.        GOTO L142;
  248.        GOTO L143;
  249.        GOTO L144;
  250.        GOTO L145;
  251.        GOTO L146;
  252.        GOTO L147;
  253.        GOTO L148;
  254.        GOTO L149;
  255.        GOTO L150;
  256.        GOTO L151;
  257.        GOTO L152;
  258.        GOTO L153;
  259.        GOTO L154;
  260.        GOTO L155;
  261.        GOTO L156;
  262.        GOTO L157;
  263.        GOTO L158;
  264.        GOTO L159;
  265.        GOTO L160;
  266.        GOTO L161;
  267.        GOTO L162;
  268.        GOTO L163;
  269.        GOTO L164;
  270.        GOTO L165;
  271.        GOTO L166;
  272.        GOTO L167;
  273.        GOTO L168;
  274.        GOTO L169;
  275.        GOTO L170;
  276.        GOTO L171;
  277.        GOTO L172;
  278.        GOTO L173;
  279.        GOTO L174;
  280.                                    (* Parameter settings follow *)
  281.        L0 :  GOTO EndCase;
  282.        L1 :  Param_Str := IToS( Data_Bits );
  283.              GOTO EndCase;
  284.        L2 :  Param_Str := Parity;
  285.              GOTO EndCase;
  286.        L3 :  Param_Str := IToS( Stop_Bits );
  287.              GOTO EndCase;
  288.        L4 :  Param_Str := IToS( Baud_Rate );
  289.              GOTO EndCase;
  290.        L5 :  Param_Str := IToS( Comm_Port );
  291.              GOTO EndCase;
  292.        L6 :  Param_Str := IToS( ORD( BS_Char ) );
  293.              GOTO EndCase;
  294.        L7 :  Param_Str := IToS( ORD( Ctrl_BS_Char ) );
  295.              GOTO EndCase;
  296.        L8 :  Param_Str := IToS( ORD( Terminal_To_Emulate ) );
  297.              GOTO EndCase;
  298.        L9 :  Param_Str := BTos( Logging_On );
  299.              GOTO EndCase;
  300.       L10 :  Param_Str := BToS( Add_Lf );
  301.              GOTO EndCase;
  302.       L11 :  Param_Str := Write_Ctrls( Modem_Init );
  303.              GOTO EndCase;
  304.       L12 :  Param_Str := Write_Ctrls( Modem_Dial );
  305.              GOTO EndCase;
  306.       L13 :  Param_Str := Write_Ctrls( Modem_Connect );
  307.              GOTO EndCase;
  308.       L14 :  Param_Str := Write_Ctrls( Modem_No_Carrier );
  309.              GOTO EndCase;
  310.       L15 :  Param_Str := Write_Ctrls( Modem_Busy );
  311.              GOTO EndCase;
  312.       L16 :  Param_Str := Write_Ctrls( Modem_Escape );
  313.              GOTO EndCase;
  314.       L17 :  Param_Str := IToS( Modem_Escape_Time );
  315.              GOTO EndCase;
  316.       L18 :  Param_Str := Write_Ctrls( Modem_Hang_Up );
  317.              GOTO EndCase;
  318.       L19 :  Param_Str := RToS( Modem_Time_Out );
  319.              GOTO EndCase;
  320.       L20 :  Param_Str := RToS( Modem_Redial_Delay );
  321.              GOTO EndCase;
  322.       L21 :  Param_Str := BToS( Silent_Mode );
  323.              GOTO EndCase;
  324.       L22 :  Param_Str := BToS( Play_Music_On );
  325.              GOTO EndCase;
  326.       L23 :  Param_Str := BToS( Local_Echo );
  327.              GOTO EndCase;
  328.       L24 :  Param_Str := Write_Ctrls( FK_CR );
  329.              GOTO EndCase;
  330.       L25 :  Param_Str := Write_Ctrls( FK_Delay );
  331.              GOTO EndCase;
  332.       L26 :  Param_Str := Write_Ctrls( FK_Wait_For );
  333.              GOTO EndCase;
  334.       L27 :  Param_Str := Trans_Type_Name[ Default_Transfer_Type ];
  335.              GOTO EndCase;
  336.       L28 :  Param_Str := Screen_Dump_Name;
  337.              GOTO EndCase;
  338.       L29 :  Param_Str := IToS( GMT_Difference );
  339.              GOTO EndCase;
  340.       L30 :  Param_Str := IToS( Transfer_Bells );
  341.              GOTO EndCase;
  342.       L31 :  Param_Str := Write_Ctrls( Modem_Answer );
  343.              GOTO EndCase;
  344.       L32 :  Param_Str := Write_Ctrls( Modem_Host_Set );
  345.              GOTO EndCase;
  346.       L33 :  Param_Str := Write_Ctrls( FK_Ctrl_Mark );
  347.              GOTO EndCase;
  348.       L34 :  IF New_Text_Mode = BW80 THEN
  349.                 Param_Str := 'M'
  350.              ELSE
  351.                 Param_Str := 'C';
  352.              GOTO EndCase;
  353.       L35 :  Param_Str := IToS( New_ForeGround_Color );
  354.              GOTO EndCase;
  355.       L36 :  Param_Str := IToS( New_BackGround_Color );
  356.              GOTO EndCase;
  357.       L37 :  Param_Str := IToS( New_Menu_Text_Color  );
  358.              GOTO EndCase;
  359.       L38 :  Param_Str := IToS( New_Menu_Frame_Color );
  360.              GOTO EndCase;
  361.       L39 :  Param_Str := IToS( Modem_Command_Delay  );
  362.              GOTO EndCase;
  363.       L40 :  Param_Str := BToS( CompuServe_B_On );
  364.              GOTO EndCase;
  365.       L41 :  Param_Str := BToS( Mahoney_On );
  366.              GOTO EndCase;
  367.       L42 :  Param_Str := Default_Prefix;
  368.              GOTO EndCase;
  369.       L43 :  Param_Str := IToS( Max_Review_Length );
  370.              GOTO EndCase;
  371.       L44 :  Param_Str := BToS( Exploding_Menus );
  372.              GOTO EndCase;
  373.       L45 :  Param_Str := BToS( Modem_Carrier_High );
  374.              GOTO EndCase;
  375.       L46 :  Param_Str := IToS( Max_Write_Buffer );
  376.              GOTO EndCase;
  377.       L47 :  Param_Str := BToS( Host_Auto_Baud );
  378.              GOTO EndCase;
  379.       L48 :  Param_Str := IToS( VT100_BackGround_Color );
  380.              GOTO EndCase;
  381.       L49 :  Param_Str := IToS( VT100_ForeGround_Color );
  382.              GOTO EndCase;
  383.       L50 :  Param_Str := IToS( VT100_Bold_Color       );
  384.              GOTO EndCase;
  385.       L51 :  Param_Str := IToS( VT100_Underline_Color  );
  386.              GOTO EndCase;
  387.       L52 :  Param_Str := Kermit_Chk_Type;
  388.              GOTO EndCase;
  389.       L53 :  Param_Str := BToS( Kermit_Debug );
  390.              GOTO EndCase;
  391.       L54 :  Param_Str := Write_Ctrls( Kermit_EOL );
  392.              GOTO EndCase;
  393.       L55 :  Param_Str := Write_Ctrls( Kermit_Header_Char );
  394.              GOTO EndCase;
  395.       L56 :  Param_Str := IToS( Kermit_Npad );
  396.              GOTO EndCase;
  397.       L57 :  Param_Str := Write_Ctrls( Kermit_Pad_Char );
  398.              GOTO EndCase;
  399.       L58 :  Param_Str := Write_Ctrls( Kermit_Quote_Char );
  400.              GOTO EndCase;
  401.       L59 :  Param_Str := Write_Ctrls( Kermit_Repeat_Char );
  402.              GOTO EndCase;
  403.       L60 :  Param_Str := IToS( Kermit_Init_Packet_Size );
  404.              GOTO EndCase;
  405.       L61 :  Param_Str := IToS( Kermit_TimeOut    );
  406.              GOTO EndCase;
  407.       L62 :  Param_Str := IToS( Kermit_Delay_Time );
  408.              GOTO EndCase;
  409.       L63 :  Param_Str := Write_Ctrls( Kermit_Quote_8_Char );
  410.              GOTO EndCase;
  411.       L64 :  Param_Str := Write_Ctrls( Default_Postfix );
  412.              GOTO EndCase;
  413.       L65 :  Param_Str := BToS( Write_Screen_Memory_Par );
  414.              GOTO EndCase;
  415.       L66 :  Param_Str := BToS( Alter_Baud_Rate );
  416.              GOTO EndCase;
  417.       L67 :  Param_Str := BToS( Exact_Capture );
  418.              GOTO EndCase;
  419.       L68 :  Param_Str := Write_Ctrls( FK_Script_Ch );
  420.              GOTO EndCase;
  421.       L69 :  Param_Str := BToS( Check_CTS );
  422.              GOTO EndCase;
  423.       L70 :  Param_Str := BToS( Check_DSR );
  424.              GOTO EndCase;
  425.       L71 :  Param_Str := Write_Ctrls( Modem_Host_UnSet );
  426.              GOTO EndCase;
  427.       L72 :  Param_Str := Write_Ctrls( Modem_Dial_End );
  428.              GOTO EndCase;
  429.       L73 :  Param_Str := BToS( Hard_Wired );
  430.              GOTO EndCase;
  431.       L74 :  Param_Str := IToS( Break_Length );
  432.              GOTO EndCase;
  433.       L75 :  Param_Str := Download_Dir_Path;
  434.              GOTO EndCase;
  435.       L76 :  Param_Str := IToS( Gossip_Window_Size );
  436.              GOTO EndCase;
  437.       L77 :  Param_Str := BToS( Gossip_Line_Mode );
  438.              GOTO EndCase;
  439.       L78 :  Param_Str := Graphics_Dump_Name;
  440.              GOTO EndCase;
  441.       L79 :  Param_Str := Write_Ctrls( Script_Parameter_Marker );
  442.              GOTO EndCase;
  443.       L80 :  Param_Str := IToS( Kermit_Window_Size   );
  444.              GOTO EndCase;
  445.       L81 :  Param_Str := BToS( Drop_Dtr_At_End      );
  446.              GOTO EndCase;
  447.       L82 :  Param_Str := BToS( Close_Comm_For_Dos   );
  448.              GOTO EndCase;
  449.       L83 :  Param_Str := BToS( Use_Short_Dial_Menu  );
  450.              GOTO EndCase;
  451.       L84 :  Param_Str := BToS( Wait_For_Retrace_Par );
  452.              GOTO EndCase;
  453.       L85 :  Param_Str := Editor_Name;
  454.              GOTO EndCase;
  455.       L86 :  Param_Str := Browser_Name;
  456.              GOTO EndCase;
  457.       L87 :  Param_Str := BToS( Show_Status_Line );
  458.              GOTO EndCase;
  459.       L88 :  Param_Str := BToS( Show_Status_Time );
  460.              GOTO EndCase;
  461.       L89 :  Param_Str := Write_Ctrls( Printer_Setup );
  462.              GOTO EndCase;
  463.       L90 :  Param_Str := BToS( Do_Xon_Xoff_Checks );
  464.              GOTO EndCase;
  465.       L91 :  Param_Str := IToS( New_Border_Color   );
  466.              GOTO EndCase;
  467.       L92 :  Param_Str := IToS( VT100_Border_Color );
  468.              GOTO EndCase;
  469.       L93 :  Param_Str := Write_Ctrls( VT100_Answerback_Message );
  470.              GOTO EndCase;
  471.       L94 :  Param_Str := BToS( Downsize_Ymodem );
  472.              GOTO EndCase;
  473.       L95 :  Param_Str := BToS( Evict_Partial_Trans );
  474.              GOTO EndCase;
  475.       L96 :  Param_Str := IToS( Script_Learn_Buffer_Size );
  476.              GOTO EndCase;
  477.       L97 :  Param_Str := IToS( Script_Learn_Lines );
  478.              GOTO EndCase;
  479.       L98 :  BEGIN
  480.                 CASE Date_Format OF
  481.                    YMD_Style: Param_Str := 'YMD';
  482.                    MDY_Style: Param_Str := 'MDY';
  483.                    DMY_Style: Param_Str := 'DMY';
  484.                 END (* CASE *);
  485.              END;
  486.              GOTO EndCase;
  487.       L99 :  BEGIN
  488.                 IF ( Time_Format = AMPM_Time ) THEN
  489.                    Param_Str := 'AMPM'
  490.                 ELSE IF ( Time_Format = Military_Time ) THEN
  491.                    Param_Str := 'MILITARY';
  492.              END;
  493.              GOTO EndCase;
  494.       L100:  Param_Str := Script_Path;
  495.              GOTO EndCase;
  496.       L101:  ;
  497.              GOTO EndCase;
  498.       L102:  Param_Str := IToS( Dialing_Dir_Size_Max );
  499.              GOTO EndCase;
  500.       L103:  Param_Str := Function_Key_Path;
  501.              GOTO EndCase;
  502.       L104:  Param_Str := Host_Mode_Download;
  503.              GOTO EndCase;
  504.       L105:  Param_Str := Host_Mode_Upload;
  505.              GOTO EndCase;
  506.       L106:  Param_Str := RToS( Host_Mode_Blank_Time );
  507.              GOTO EndCase;
  508.       L107:  Param_Str := BToS( Use_Ymodem_Header );
  509.              GOTO EndCase;
  510.       L108:  Param_Str := IToS( ORD( Script_Search_Order ) );
  511.              GOTO EndCase;
  512.       L109:  Param_Str := BToS( Use_Block_Zero  );
  513.              GOTO EndCase;
  514.       L110:  Param_Str := BToS( Extended_Keypad );
  515.              GOTO EndCase;
  516.       L111:  Param_Str := Write_Ctrls( Kermit_Handshake_Char );
  517.              GOTO EndCase;
  518.       L112:  WITH Menu_Box_Chars DO
  519.                 Param_Str := Top_Left_Corner      +
  520.                              Top_Line             +
  521.                              Top_Right_Corner     +
  522.                              Right_Line           +
  523.                              Bottom_Right_Corner  +
  524.                              Bottom_Line          +
  525.                              Bottom_Left_Corner   +
  526.                              Left_Line;
  527.              GOTO EndCase;
  528.       L113:  Param_Str := IToS( Command_Key );
  529.              GOTO EndCase;
  530.       L114:  Param_Str := BToS( Attended_Mode    );
  531.              GOTO EndCase;
  532.       L115:  Param_Str := IToS( Ascii_Char_Delay );
  533.              GOTO EndCase;
  534.       L116:  Param_Str := IToS( Ascii_Line_Delay );
  535.              GOTO EndCase;
  536.       L117:  Param_Str := IToS( ORD( Ascii_Pacing_Char ) );
  537.              GOTO EndCase;
  538.       L118:  Param_Str := BToS( Ascii_Send_Asis );
  539.              GOTO EndCase;
  540.       L119:  Param_Str := Write_Ctrls( Ascii_CR_LF_String );
  541.              GOTO EndCase;
  542.       L120:  Param_Str := BToS( Ascii_Send_Blank  );
  543.              GOTO EndCase;
  544.       L121:  Param_Str := BToS( Ascii_Use_CtrlZ   );
  545.              GOTO EndCase;
  546.       L122:  Param_Str := BToS( Ascii_Show_Text   );
  547.              GOTO EndCase;
  548.       L123:  Param_Str := BToS( Ascii_Translate   );
  549.              GOTO EndCase;
  550.       L124:  Param_Str := BToS( Edit_Insert_Mode  );
  551.              GOTO EndCase;
  552.       L125:  Param_Str := IToS( Xmodem_Char_Wait  );
  553.              GOTO EndCase;
  554.       L126:  Param_Str := IToS( Xmodem_Ack_Wait   );
  555.              GOTO EndCase;
  556.       L127:  Param_Str := IToS( Xmodem_Max_Errors );
  557.              GOTO EndCase;
  558.       L128:  Param_Str := IToS( Xmodem_Block_Wait );
  559.              GOTO EndCase;
  560.       L129:  Param_Str := BToS( Auto_Load_FunKeys );
  561.              GOTO EndCase;
  562.       L130:  Param_Str := BToS( Use_Dos_Buffer_In );
  563.              GOTO EndCase;
  564.       L131:  Param_Str := Host_CTTY_Device;
  565.              GOTO EndCase;
  566.       L132:  Param_Str := BToS( YTerm_On );
  567.              GOTO EndCase;
  568.       L133:  Param_Str := BToS( Use_Dos_Con_Output );
  569.              GOTO EndCase;
  570.       L134:  Param_Str := BToS( Auto_Unload_Scripts );
  571.              GOTO EndCase;
  572.       L135:  Param_Str := Write_Ctrls( Modem_Ring );
  573.              GOTO EndCase;
  574.       L136:  Param_Str := IToS( Max_Screen_Line );
  575.              GOTO EndCase;
  576.       L137:  Param_Str := IToS( Max_Screen_Col );
  577.              GOTO EndCase;
  578.       L138:  Param_Str := IToS( Async_Buffer_Length );
  579.              GOTO EndCase;
  580.       L139:  Param_Str := IToS( Async_OBuffer_Length );
  581.              GOTO EndCase;
  582.       L140:  Param_Str := '';
  583.              GOTO EndCase;
  584.       L141:  Param_Str := BToS( Auto_Find_FileNames );
  585.              GOTO EndCase;
  586.       L142:  Param_Str := Dec_To_Hex( Default_Com_Base[1] );
  587.              GOTO EndCase;
  588.       L143:  Param_Str := Dec_To_Hex( Default_Com_Base[2] );
  589.              GOTO EndCase;
  590.       L144:  Param_Str := Dec_To_Hex( Default_Com_Base[3] );
  591.              GOTO EndCase;
  592.       L145:  Param_Str := Dec_To_Hex( Default_Com_Base[4] );
  593.              GOTO EndCase;
  594.       L146:  Param_Str := IToS( Default_Com_Irq[1] );
  595.              GOTO EndCase;
  596.       L147:  Param_Str := IToS( Default_Com_Irq[2] );
  597.              GOTO EndCase;
  598.       L148:  Param_Str := IToS( Default_Com_Irq[3] );
  599.              GOTO EndCase;
  600.       L149:  Param_Str := IToS( Default_Com_Irq[4] );
  601.              GOTO EndCase;
  602.       L150:  Param_Str := Dec_To_Hex( Default_Com_RS232[1] );
  603.              GOTO EndCase;
  604.       L151:  Param_Str := Dec_To_Hex( Default_Com_RS232[2] );
  605.              GOTO EndCase;
  606.       L152:  Param_Str := Dec_To_Hex( Default_Com_RS232[3] );
  607.              GOTO EndCase;
  608.       L153:  Param_Str := Dec_To_Hex( Default_Com_RS232[4] );
  609.              GOTO EndCase;
  610.       L154:  Param_Str := User_Term_Name[1];
  611.              GOTO EndCase;
  612.       L155:  Param_Str := User_Term_Name[2];
  613.              GOTO EndCase;
  614.       L156:  Param_Str := User_Term_Name[3];
  615.              GOTO EndCase;
  616.       L157:  Param_Str := IToS( Status_BackGround_Color );
  617.              GOTO EndCase;
  618.       L158:  Param_Str := IToS( Status_ForeGround_Color );
  619.              GOTO EndCase;
  620.       L159:  Param_Str := BToS( Reverse_Status_Colors );
  621.              GOTO EndCase;
  622.       L160:  Param_Str := IToS( New_Menu_Text_Color_2 );
  623.              GOTO EndCase;
  624.       L161:  Param_Str := IToS( New_Menu_Title_Color );
  625.              GOTO EndCase;
  626.       L162:  Param_Str := BToS( Auto_Change_Arrows );
  627.              GOTO EndCase;
  628.       L163:  Param_Str := BToS( Auto_Strip_High_Bit );
  629.              GOTO EndCase;
  630.       L164:  Param_Str := IToS( Zmodem_BlockSize );
  631.              GOTO EndCase;
  632.       L165:  Param_Str := FileName;
  633.              GOTO EndCase;
  634.       L166:  Param_Str := IToS( FK_Delay_Time );
  635.              GOTO EndCase;
  636.       L167:  Param_Str := BToS( Software_Scroll_Par );
  637.              GOTO EndCase;
  638.       L168:  Param_Str := BToS( Use_Prev_Key_Text );
  639.              GOTO EndCase;
  640.       L169:  Param_Str := BToS( Send_Upper_Case_Only );
  641.              GOTO EndCase;
  642.       L170:  Param_Str := IToS( Kermit_Extended_Block );
  643.              GOTO EndCase;
  644.       L171:  Param_Str := User_Term_Name[4];
  645.              GOTO EndCase;
  646.       L172:  Param_Str := User_Term_Name[5];
  647.              GOTO EndCase;
  648.       L173:  IF Host_Mode THEN
  649.                 Param_Str := Privilege
  650.              ELSE
  651.                 Param_Str := ' ';
  652.              GOTO EndCase;
  653.       L174:  Param_Str := BToS( ATI_Ega_Wonder );
  654.  
  655.    EndCase:
  656.  
  657. END   (* Get_Parameter *);
  658.  
  659. (*----------------------------------------------------------------------*)
  660. (*    Write_Config_File --- Write updated PibTerm configuration file    *)
  661. (*----------------------------------------------------------------------*)
  662.  
  663. PROCEDURE Write_Config_File( Config_File_Name : AnyStr );
  664.  
  665. (*----------------------------------------------------------------------*)
  666. (*                                                                      *)
  667. (*     Procedure:  Write_Config_File                                    *)
  668. (*                                                                      *)
  669. (*     Purpose:    Writes updated parameters to PibTerm config. file    *)
  670. (*                                                                      *)
  671. (*     Calling Sequence:                                                *)
  672. (*                                                                      *)
  673. (*        Write_Config_File;                                            *)
  674. (*                                                                      *)
  675. (*      Calls:   Get_Parameter                                          *)
  676. (*                                                                      *)
  677. (*----------------------------------------------------------------------*)
  678.  
  679. VAR
  680.    S          : AnyStr;
  681.    I          : INTEGER;
  682.    Written    : ARRAY[1..Max_Param_Names] OF BOOLEAN;
  683.    SName      : String12;
  684.    RName      : String12;
  685.    T          : Transfer_Type;
  686.    SingleF    : CHAR;
  687.    HostOK     : CHAR;
  688.    Config_File: Text_File;
  689.  
  690. BEGIN (* Write_Config_File *)
  691.                                    (* Fix up config file name *)
  692.  
  693.    IF ( LENGTH( Config_File_Name ) = 0 ) THEN
  694.       Config_File_Name := Home_Dir + 'PIBTERM.CNF'
  695.    ELSE
  696.       IF ( POS( '\' , Config_File_Name ) = 0 ) AND
  697.          ( POS( ':' , Config_File_Name ) = 0 ) THEN
  698.          Config_File_Name := Home_Dir + Config_File_Name;
  699.  
  700.    ASSIGN( Config_File, Config_File_Name );
  701.              (*$I-*)
  702.    REWRITE( Config_File );
  703.              (*$I+*)
  704.  
  705.    IF Int24Result <> 0 THEN
  706.       BEGIN
  707.          WRITELN;
  708.          WRITELN('Can''t write to ',Config_File_Name);
  709.       END
  710.    ELSE
  711.       BEGIN  (* Write configuration file *)
  712.  
  713.                                    (* FC= *)
  714.          Get_Parameter( 24 , S );
  715.          WRITELN( Config_File , Param_Names_2[24], '=', S );
  716.  
  717.                                    (* FD= *)
  718.          Get_Parameter( 25 , S );
  719.          WRITELN( Config_File , Param_Names_2[25], '=', S );
  720.  
  721.                                    (* FW= *)
  722.          Get_Parameter( 26 , S );
  723.          WRITELN( Config_File , Param_Names_2[26], '=', S );
  724.  
  725.                                    (* FM= *)
  726.          Get_Parameter( 33 , S );
  727.          WRITELN( Config_File , Param_Names_2[33], '=', S );
  728.  
  729.                                    (* FS= *)
  730.          Get_Parameter( 68 , S );
  731.          WRITELN( Config_File , Param_Names_2[68], '=', S );
  732.  
  733.          FOR I := 1 TO Max_Param_Names DO
  734.             Written[I] := FALSE;
  735.                                    (* Indicate we've written these *)
  736.          Written[ 24] := TRUE;
  737.          Written[ 25] := TRUE;
  738.          Written[ 26] := TRUE;
  739.          Written[ 33] := TRUE;
  740.          Written[ 68] := TRUE;
  741.                                    (* Don't write obsolete params *)
  742.          Written[101] := TRUE;
  743.                                    (* Don't write FN, PD, or HP now *)
  744.          Written[140] := TRUE;
  745.          Written[165] := TRUE;
  746.          Written[173] := TRUE;
  747.                                    (* Write file transfer definitions *)
  748.  
  749.          FOR I := ORD( Zmodem ) TO ORD(PUser5) DO
  750.             BEGIN
  751.                T     := Transfers[SUCC(I)];
  752.                SName := TRIM( Send_Script_Names[T] );
  753.                RName := TRIM( Receive_Script_Names[T] );
  754.                IF ( ( LENGTH( SName ) > 0 ) OR
  755.                     ( LENGTH( RName ) > 0 ) ) THEN
  756.                   BEGIN
  757.                      IF Single_File_Protocol[T] THEN
  758.                         SingleF := 'S'
  759.                      ELSE
  760.                         SingleF := 'B';
  761.                      IF ( SName = '' ) THEN SName := '*';
  762.                      IF ( RName = '' ) THEN RName := '*';
  763.                      IF ( Trans_OK_In_Host[T] ) THEN
  764.                         HostOK := 'H'
  765.                      ELSE
  766.                         HostOK := 'T';
  767.                      WRITELN( Config_File, 'PD=', Trans_Type_Name[T], ' ',
  768.                               LTrim(Transfer_Name_List[SUCC(I)]), ' ',
  769.                               SingleF, ' ',
  770.                               HostOK, ' ',
  771.                               RName, ' ', SName );
  772.                   END;
  773.             END;
  774.                                    (* Write other parameter definitions *)
  775.  
  776.          FOR I := 1 TO Max_Param_Names DO
  777.             IF ( NOT Written[I] ) THEN
  778.                BEGIN
  779.                   Get_Parameter( I , S );
  780.                   WRITELN( Config_File , Param_Names_2[I], '=', S );
  781.                END;
  782.  
  783.       END   (* Write configuration file *);
  784.  
  785.       (*$I-*)
  786.    CLOSE( Config_File );
  787.       (*$I+*)
  788.  
  789.    I := Int24Result;
  790.  
  791. END   (* Write_Config_File *);
  792.  
  793.